<?php
class Admin_Form_ProductCategory extends Zend_Form{
    public function init()
    {
        $this->setName('loai_san_pham');

        $ma = new Zend_Form_Element_Hidden('ma');
        $ma->addFilter('Int');

        $ma_loai_cha = new Zend_Form_Element_Text('ma_loai_cha');
        $ma_loai_cha->addFilter('Int');
        $ma_loai_cha->setLabel('Mã loại cha')
        ->setRequired('true');

        $ten = new Zend_Form_Element_Text('ten');
        $ten->setLabel('Tên Sản Phẩm')
        ->setRequired(true)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator('NotEmpty');

        $mota = new Zend_Form_Element_Textarea('mo_ta');
        $mota->setLabel('Mô tả')
        ->setRequired(true)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator('NotEmpty');
        //$value= new Admin_Model_ArticleCategory();

        $thu_thu_hien_thi = new Zend_Form_Element_Text('thu_tu_hien_thi');
        $thu_thu_hien_thi->setLabel('Thứ tự hiển thị');
        $thu_thu_hien_thi->setRequired(true);


        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        $this->addElements(array($ma, $ma_loai_cha, $ten, $mota, $thu_thu_hien_thi , $submit));

    }
}
